minecraft_modsfandomcom-20200222-history
Minecraft Mods Wiki:CGG
Crafting Grids are an important aspect of almost every article on the wiki, used to inform readers about how they can obtain the items and blocks they are reading about. This wiki has a dedicated set of templates, originally created by , for use in displaying these grids. It is extremely important that this template syntax is understood and used correctly by all editors. This guide page has been written for that purpose. As a general note, remember to preview pages before you save them, until you fully understand how everything works and are comfortable with it. It allows you to make sure the page was built and displays correctly, and more importantly it allows you to make sure you did not make a mistake when calling a template (like, say, forgetting the brackets used to close it). __TOC__ Basics All Crafting Grid templates are named and called using the following convention: For example: * Crafting Table – * Furnace – * Macerator (IndustrialCraft 2) – * Sawmill – A full list of available crafting grid templates can be seen here. If a crafting grid is not available, please contact a staff member. Each location within a crafting grid that can contain an item will have a specific cell name that corresponds to it. The cell names can vary across different grids, so it it is important to always read the templates’ documentation pages. If no item is to be placed in a specific cell of a crafting grid, it does not need to be entered into the template call. The cells are filled by using the templates and : Template:Grid/Cell and Template:Grid/Ore Dictionary. These will be explained later in this guide, but in short, their purpose is to take the name of an item, or an Ore Dictionary tag name, and display an image of it, which also displays a tooltip when the mouse is hovered over it. The choice between which to use is dependent upon how the recipe in question is defined by the mod that adds it. To find that out, it is usually necessary to look through the mod’s source code for where the recipe is added. A program such as JD-GUI may be helpful for this, though many mods have their source visible in code repositories on websites such as GitHub and BitBucket. Template:G/Cell , more commonly called , is the standard template used to display items. It requests an item name and an abbreviated mod name, and displays an image of that item and a link to that item’s page. A list of abbreviated mod names can be found here. can also accept an alternate page for the image to link to (or link=none for no link), alternate text to use for the tooltip, and a stack size to display for the item it displays. The text to use for the tooltip is defined with the parameters title= and desc=. title= changes the displayed item name, and desc= adds additional lines of descriptive text to the tooltip. Both title= and desc= accept formatting codes, as defined in . (Use / to produce a new line, & for formatting codes, and \ to end the use of a formatting code.) Related to link= is dis=, a true/false parameter (default true) that sets whether or not the image links to a mod-disambiguated page title. Do not define both dis= and link= in a single use of . Shown below are one incorrect and four correct uses of : If a mod= parameter is not properly defined, the following error will be displayed: Shown below is the template call for the recipe of a Diamond Pickaxe, as it would be defined in vanilla Minecraft. |B1= |C1= |B2= |B3= |O= }} This code produces: |B1= |C1= |B2= |B3= |O= }} Template:Grid/Ore Dictionary The Ore Dictionary is a component of Minecraft Forge, designed to allow ores and ingots of the same type to be used by different mods and treated as the same. The FTB Wiki contains an Dictionary extension, allowing Crafting Grid displays to do the same. , more commonly called , is the normal way to display an object in a crafting grid, in which the crafting recipe uses the Ore Dictionary to determine recipe inputs. is called using an Ore Dictionary tag name, rather than an item name. A full list of all currently registered Ore Dictionary tags and the items they correspond to can be found on . Ore Dictionary tags can be added on . Like , accepts an item stack size parameter, but unlike , does not request any other parameters. Additionally, automatically animates itself, alternating its display among all possible items. Shown below is an isolated use of . This code produces: Shown below is the template call for the recipe of a Diamond Pickaxe, using the Ore Dictionary. |B1= |C1= |B2= |B3= |O= }} This code produces: |B1= |C1= |B2= |B3= |O= }} should not be used for displaying crafting grid outputs, unless the mod does output an OreDictionary tag instead of a specific item. However, this is considered a bug in the mod, and should be reported to the author(s) immediately. Tilesheets The images displayed by and are retrieved from Tilesheets, large image files of every block and item added by a mod, and linked to by a server-side registry. A list of all tilesheets currently on the wiki can be found on , and a list of all items stored in all sheets can be found on . If is given the name of an item that does not appear in a tilesheet, or is given the wrong Mod name, will display a flat red box. An example is shown below. Produces: If this occurs, an error will also appear under Tilesheet extension warnings in the page preview. If this occurs when editing a page, check to make sure the mod abbreviation and item name are set correctly (check the Item List to be sure), and if you are sure that the red box comes from a missing tilesheet entry, finish your editing, save the page, and report the missing entry to a wiki staff member. In certain rare cases, the name of an item in a tilesheet will not match the name of the item in game. This is usually done deliberately by the wiki staff member who set up the tilesheet, as an individual tilesheet cannot contain two items with identical names. If this is the case, the parameter title= should be used to change the tooltip to display the correct item name. Mod abbreviations can be added and viewed on Module:Mods/list, as well as on the , using ’s bot. Shapeless crafting recipes Shapeless crafting recipes are defined in the same way as shaped crafting recipes, but with one additional parameter and a somewhat different display. To define a crafting recipe as shapeless, add the parameter shapeless=true to the crafting grid template call. Shown below is an example of a shapeless crafting recipe. |B1= |A2= |B2= |O= |shapeless=true }} This code produces: |B1= |A2= |B2= |O= |shapeless=true }} Multiple recipes in a single grid Multiple crafting recipes can be defined within a single crafting grid. To do so, simply give multiple separate items to a single crafting grid slot. The grid will become paged, with each page displaying an individual recipe. If an item is only defined once in a crafting grid slot, it will be used in that slot in all displayed recipes. To display a blank slot in a grid, define an empty in that slot. An example of a paged crafting grid is shown below. |B1= |C1= |A2= |B2= |C2= |A3= |B3= |O= }} This code produces: |B1= |C1= |A2= |B2= |C2= |A3= |B3= |O= }} Special crafting grid inputs Tank Cells Tank Cells are not a feature used in all crafting grids, but certain mods add machines that have internal fluid tanks, and have recipes that consume fluid from those tanks. Tank cells are never used in isolation; they are only ever used in crafting grids that would use them. Tank cells are filled using , Template:Tank. is called with a fluid name and an amount in mB, millibuckets. A small number of alternate crafting grids also have areas in them that show internal energy storage and/or energy consumed by a recipe. These visual displays also use . An example of this is shown below |O= |tank= |power= }} This code produces: |O= |tank= |power= }} Text strings Certain crafting recipes require strings of text or numbers as inputs to their recipes. For cases like this, use . Shown below is an example of a (rather complicated) crafting grid that requires string inputs. |I2= |I3= |I4= |I5= |I6= |I7= |I8= |I9= |I10= |I11= |I12= |O2= |Temp=600 |T1= |T2= |T3= |Bonus= }} This code produces: |I2= |I3= |I4= |I5= |I6= |I7= |I8= |I9= |I10= |I11= |I12= |O2= |Temp= |Therm= |T1= |T2= |T3= |Bonus= }} What not to do While and can be used outside of crafting grids, the images they produce are sized and formatted specifically for use in crafting grids, and as such they do not fit well into the text of regular pages. Using them in an is, however, expected, and using them in tables is acceptable. Over the years of this wiki, template conventions have changed. One very important convention to have changed is the use of . combined the functions of and , accepting an item name and returning a list of Ore Dictionary-equivalent items. The previous version of this guide said to use almost everywhere. However, has a few important flaws. First, it is significantly slower than or . Pages that use can take twice as long to load as pages that use and . Second, can display the wrong thing. Items can have more than one Ore Dictionary tag associated with them, and does not have a way of differentiating which tag to look at when generating its list of items to display. When in doubt, view the source of some pages recently created by staff members, or ask them for help. Category:Wiki guides